package com.mbc.web.common.client.controller;

import java.util.Date;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.mbc.common.data.CurrencyReferenceData;
import com.mbc.common.data.UserData;
import com.mbc.common.entities.Branch;
import com.mbc.common.entities.BranchRpt;
import com.mbc.common.entities.BranchType;
import com.mbc.common.entities.BranchTypeRpt;
import com.mbc.common.entities.Country;
import com.mbc.common.entities.CountryRpt;
import com.mbc.common.entities.Currency;
import com.mbc.common.entities.CurrencyRate;
import com.mbc.common.entities.CurrencyRateDetail;
import com.mbc.common.entities.CurrencyRateRpt;
import com.mbc.common.entities.CurrencyRpt;
import com.mbc.common.entities.SystemProperty;
import com.mbc.web.common.shared.dto.AppItemListDTO;
import com.mbc.web.common.shared.dto.BranchDataListDTO;
import com.mbc.web.common.shared.dto.BranchListDTO;
import com.mbc.web.common.shared.dto.BranchTypeDataListDTO;
import com.mbc.web.common.shared.dto.BranchViewLoadDTO;
import com.mbc.web.common.shared.dto.CountryDataListDTO;
import com.mbc.web.common.shared.dto.CurrencyDataListDTO;
import com.mbc.web.common.shared.dto.CurrencyRateDataListDTO;
import com.mbc.web.common.shared.dto.CurrencyRateViewLoadDTO;

public interface WebCommonContollerAsync {
	void login(String loginID, String password, String dsName, AsyncCallback<UserData> callback) ;
	void logout(AsyncCallback<Integer> callback);
	void getDSNames(AsyncCallback<List<String[]>> callback);
	void getAllAppItems(AsyncCallback<AppItemListDTO> callback);
	
	//SystemProperty
	void getSystemProperty(String key, AsyncCallback<SystemProperty> callback);
	//End SystemProperty
	
	//Office
	void getAllBranch(AsyncCallback<BranchListDTO> callback);
	//End Office
	
	//Currency
	void createCurrency(Currency currency, AsyncCallback<Integer> callback);
	void updateCurrency(Currency currency, AsyncCallback<Integer> callback);
	void deleteCurrency(long currencyId, AsyncCallback<Integer> callback);
	void getCurrencyList(Currency cri, AsyncCallback<CurrencyDataListDTO> callback);
	void getAllCurrency(AsyncCallback<List<CurrencyReferenceData>> callback);
	void viewCurrencyReport(String fromCode, String toCode, AsyncCallback<Integer> callback);
	void prepareCurrencyReport(CurrencyRpt info, AsyncCallback<Integer> callback);
	void findCurrencyByCode(String code, AsyncCallback<Currency> Callback);
	//End Currency
	
	//Currency Rate
	void createCurrencyRate(CurrencyRate currencyRate, AsyncCallback<Integer> callback);
	void updateCurrencyRate(CurrencyRate currencyRate, AsyncCallback<Integer> callback);
	void deleteCurrencyRate(long key, AsyncCallback<Integer> callback);
	void findCurrencyRate(long key, AsyncCallback<CurrencyRate> callback);
	void findCurrencyRates(CurrencyRate params, AsyncCallback<CurrencyRateDataListDTO> callback);
	void findLatestDetail(long currencyRateId, AsyncCallback<CurrencyRateDetail> callback);
	void findLatestDetail(long sourceCurrencyId, long convertCurrencyId, AsyncCallback<CurrencyRateDetail> callback);
	void getCurrencyRateViewLoadDTO(AsyncCallback<CurrencyRateViewLoadDTO> callback);
	void prepareCurrencyRateReport(CurrencyRateRpt info,AsyncCallback<Integer> callback);
	void getSourcetoHomeRate(long source_currency, AsyncCallback<CurrencyRate> callback);
	void findCurrencyRateByCode(String code, AsyncCallback<CurrencyRate> Callback);
	//End Currency Rate
	
	//Office
	void createBranch(Branch branch, AsyncCallback<Integer> callback);
	void updateBranch(Branch branch, AsyncCallback<Integer> callback);
	void deleteBranch(long key, AsyncCallback<Integer> callback);
	void findBranches(Branch cri, AsyncCallback<BranchDataListDTO> callback);
	void getBranchViewLoadDTO(AsyncCallback<BranchViewLoadDTO> callback);
	//End Office
	
	// Country
	void createCountry(Country country, AsyncCallback<Integer> callback);
	void updateCountry(Country country, AsyncCallback<Integer> callback);
	void deleteCountry(long countryId, AsyncCallback<Integer> callback);
	void findCountry(Country cri,AsyncCallback<CountryDataListDTO> callback);
	void findCountryByCode(Country entity, AsyncCallback<Country> Callback);
	void prepareCountryReport(CountryRpt info,AsyncCallback<Integer> callback);
	//End Country
	
	// Branch Type
	void createBranchType(BranchType type, AsyncCallback<Integer> callback);
	void updateBranchType(BranchType type, AsyncCallback<Integer> callback);
	void deleteBranchType(long typeId, AsyncCallback<Integer> callback);
	void findBranchTypes(BranchType cri, AsyncCallback<BranchTypeDataListDTO> callback);
	void findBranchTypeByCode(BranchType entity, AsyncCallback<BranchType> callback);
	void prepareBranchTypeReport(BranchTypeRpt branchTypeRpt,AsyncCallback<Integer> callback);
	// End Branch Type
	
	//Branch
	void findBranchByCode(String code, AsyncCallback<Branch> callback);
	void prepareBranchReport(BranchRpt info, AsyncCallback<Integer> callback);
	//End Branch
	
	void heartBeat(Date latestDateTime,AsyncCallback<Integer> callback);
}
